package com.zb.service.impl;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.entity.ZjWorkEmpChangeLog;
import com.zb.mapper.ZjWorkEmpChangeLogMapper;
import com.zb.service.ZjWorkEmpChangeLogService;
import com.zb.vo.OrderChangeServiceEmpVo;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 工单客服转单记录表 服务实现类
 * </p>
 *
 * @author WEN
 * @since 2023-10-24
 */
@Service
public class ZjWorkEmpChangeLogServiceImpl extends ServiceImpl<ZjWorkEmpChangeLogMapper, ZjWorkEmpChangeLog> implements ZjWorkEmpChangeLogService {

    // 保存改派工单客服记录
    @Override
    public void save(Long custAccId, Long oldEmpId, OrderChangeServiceEmpVo changeServiceEmpVo) {
        ZjWorkEmpChangeLog changeLog = new ZjWorkEmpChangeLog();
        changeLog.setId(IdWorker.getId());
        changeLog.setCustAccId(custAccId);
        changeLog.setWorkId(changeServiceEmpVo.getWorkId());
        changeLog.setEmpId(oldEmpId);
        changeLog.setRemark(changeServiceEmpVo.getRemark());
        this.save(changeLog);
    }
}
